<template>
  <div class="class">
    <el-menu
      :default-active="activeIndex"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
    >
      <img class="img" src="../../assets/images/logo.png" alt title="回到首页">
      <el-menu-item index="staffList">人员列表</el-menu-item>
      <!-- <el-submenu index="2">
        <template slot="title">我的工作台</template>
        <el-menu-item index="2-1">选项1</el-menu-item>
        <el-menu-item index="2-2">选项2</el-menu-item>
        <el-menu-item index="2-3">选项3</el-menu-item>
        <el-submenu index="2-4">
          <template slot="title">选项4</template>
          <el-menu-item index="2-4-1">选项1</el-menu-item>
          <el-menu-item index="2-4-2">选项2</el-menu-item>
          <el-menu-item index="2-4-3">选项3</el-menu-item>
        </el-submenu>
      </el-submenu> -->
    </el-menu>
  </div>
</template>

<script>
export default {
  name: 'mainheader',
  components: {},
  data() {
    return {
      activeIndex: 'staffList'
    }
  },
  props: {

    type: Object,
    default: {}
  },
  computed: {},
  methods: {
    //切换一级导航回调
    handleSelect(index) {
      this.$emit('onDataChange', index)
    }
  },
  mounted() { },
  updated() { },
  watch: {},
  created() { },
  destroyed() { },
}

</script>

<style scoped lang='less'>
.img {
  float: left;
  width: 40px;
  height: 40px;
  margin: 10px 30px;
  cursor: pointer;
}
</style>
